DIR=$( dirname "$(readlink -f  ${BASH_SOURCE[0]})" )
export pv="${DIR}/pv"
export PGPASSWORD='ypkj@1234'
if [[ ! -d ${HOME}/zxhtom/export/taos/data ]]
then
  mkdir -p ${HOME}/zxhtom/export/taos/data
fi
mysql -e "show databases;" -uyapai -pypkj@1234 | grep -Ev "information_schema|performance_schema" | sed -n '2,$p' | xargs mysqldump -uyapai -pypkj@1234 --databases --skip-add-locks > ${HOME}/zxhtom/export/mysql_dump.sql
pg_dump -hlocalhost -Uyapai -dthingsboard -C --exclude-table="public.(audit_log|event|ts_kv)*" > ${HOME}/zxhtom/export/export_pg.sql
taosdump -c /etc/taos/taos.cfg -o ${HOME}/zxhtom/export/taos/data -hlocalhost -uyapai -pypkj@1234 -A -B80 -T8
